package com.qiaofang.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@Table(name = "tm_customer_premises")
public class CustomerPremises {

    @Id
    @ApiModelProperty("主键ID")
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @CreatedDate
    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @LastModifiedDate
    @ApiModelProperty("修改时间")
    @Column(name = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 报备人
     */
    @Column(name = "staff_id")
    private Long staffId;

    /**
     * 报备人所属公司ID
     */
    @Column(name = "staff_company_id")
    private Long staffCompanyId;

    /**
     * 案场人员ID
     */
    @Column(name = "partner_id")
    private Long partnerId;

    /**
     * 案场人员所属公司ID
     */
    @Column(name = "company_id")
    private Long companyId;

    /**
     * 报备楼盘
     */
    @Column(name = "premises_id")
    private Long premisesId;

    /**
     * 报备客户
     */
    @Column(name = "customer_id")
    private Long customerId;

    /**
     * 手机号码
     */
    @Column(name = "mobile")
    private String mobile;

    /**
     * 姓名
     */
    @Column(name = "name")
    private String name;

    /**
     * 性别
     */
    @Column(name = "gender")
    private String gender;

    /**
     * 交易状态
     */
    @Column(name = "confirm_status")
    private String confirmStatus;

    /**
     * 客户状态
     */
    @Column(name = "customer_status")
    private String customerStatus;

    /**
     * 楼栋名称
     */
    @Column(name = "building_name")
    private String buildingName;

    /**
     * 房间名称
     */
    @Column(name = "room_name")
    private String roomName;

    /**
     * 报备类型
     */
    @Column(name = "report_type")
    private String reportType;

    /**
     * 计价面积
     */
    @Column(name = "valuation_area")
    private BigDecimal valuationArea;

    /**
     * 成交总额
     */
    @Column(name = "deal_amount")
    private BigDecimal dealAmount;

    @Column(name = "report_period_time")
    private Date reportPeriodTime;

    @Column(name = "report_valid_time")
    private Date reportValidTime;

    @Column(name = "visit_baohu_time")
    private Date visitBaohuTime;

    /**
     * 到访时间
     */
    @Column(name = "visit_time")
    private Date visitTime;

    /**
     * 期望到访时间
     */
    @Column(name = "hope_visit_time")
    private Date hopeVisitTime;

    /**
     * 认筹时间
     */
    @Column(name = "pay_deposit_time")
    private Date payDepositTime;
    /**
     * 认购时间
     */
    @Column(name = "subscribe_time")
    private Date subscribeTime;
    /**
     * 签约时间
     */
    @Column(name = "sign_time")
    private Date signTime;

    /**
     * 对接人
     */
    @Column(name = "principal_id")
    private Long principalId;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    @ApiModelProperty("是否删除，0-否，1-是")
    @Column(name = "del_flag")
    private String delFlag;

}
